home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / INTERVIE / GRAPHIC / SPLINES.H < prev    next >
C/C++ Source or Header  |  1991-12-10  |  3KB  |  83 lines

  1. /*
  2.  * Copyright (c) 1987, 1988, 1989 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided
  6.  * that the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Stanford not be used in advertising or
  9.  * publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.  Stanford makes no representations about
  11.  * the suitability of this software for any purpose.  It is provided "as is"
  12.  * without express or implied warranty.
  13.  *
  14.  * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  */
  22.  
  23. /*
  24.  * Interface to BSplines, objects derived from Graphic.
  25.  */
  26.  
  27. #ifndef splines_h
  28. #define splines_h
  29.  
  30. #include <InterViews/Graphic/lines.h>
  31.  
  32. class BSpline : public MultiLine {
  33. public:
  34.     BSpline();
  35.     BSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
  36.  
  37.     virtual Graphic* Copy();
  38.     virtual ClassId GetClassId();
  39.     virtual boolean IsA(ClassId);
  40. protected:
  41.     virtual boolean contains(PointObj&, Graphic*);
  42.     virtual boolean intersects(BoxObj&, Graphic*);
  43.     virtual void draw(Canvas*, Graphic*);
  44. };
  45.  
  46. class ClosedBSpline : public BSpline {
  47. public:
  48.     ClosedBSpline();
  49.     ClosedBSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
  50.  
  51.     virtual Graphic* Copy();
  52.     virtual ClassId GetClassId();
  53.     virtual boolean IsA(ClassId);
  54. protected:
  55.     virtual boolean contains(PointObj&, Graphic*);
  56.     virtual boolean intersects(BoxObj&, Graphic*);
  57.     virtual void draw(Canvas*, Graphic*);
  58. };
  59.  
  60. class FillBSpline : public ClosedBSpline {
  61. public:
  62.     FillBSpline();
  63.     FillBSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
  64.  
  65.     virtual void SetBrush(PBrush*);
  66.  
  67.     virtual Graphic* Copy();
  68.     virtual ClassId GetClassId();
  69.     virtual boolean IsA(ClassId);
  70. protected:
  71.     virtual void getExtent(float&, float&, float&, float&, float&, Graphic*);
  72.     virtual boolean contains(PointObj&, Graphic*);
  73.     virtual boolean intersects(BoxObj&, Graphic*);
  74.     virtual void draw(Canvas*, Graphic*);
  75.  
  76.     virtual void pat(Ref);
  77.     virtual Ref pat();
  78.     virtual void br(Ref);
  79.     virtual Ref br();
  80. };
  81.  
  82. #endif
  83.